package com.ylkj.patient.moduleimpl;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.examination.mlib.constants.ARouterConstants;
import com.examination.mlib.interfaceapi.MallBackApi;
import com.ylkj.patient.ui.activities.MainActivity;
import com.ylkj.patient.utils.AppReactUtils;

@Route(path = ARouterConstants.MallModuleImpl)
public class MallModuleImpl implements MallBackApi {


    @Override
    public void init(Context context) {

    }

    @Override
    public void Android2RnPush(Context context, String pluginId, String componentName) {
        AppReactUtils.INSTANCE.push(context,pluginId,componentName);
    }

    @Override
    public void Android2RnPush(Context context, String pluginId, String componentName, Bundle bundle) {
        AppReactUtils.INSTANCE.push(context,pluginId,componentName,bundle);
    }

    @Override
    public View getMainTabLayoutView(Activity activity) {
        if (activity instanceof MainActivity) {
            return ((MainActivity) activity).getMainTabLayoutView();
        }
        return null;
    }
}
